package io.renren.modules.sp.controller.front;

import io.renren.common.utils.Result;
import io.renren.modules.sp.dto.SpExcludeAreaDTO;
import io.renren.modules.sp.service.SpBaseMatchItemGoupRefService;
import io.renren.modules.sp.service.SpExcludeAreaService;
import io.renren.modules.sys.dto.SysDictDataDTO;
import io.renren.modules.sys.entity.SysDictDataEntity;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* 赛事报名地区控制
*
* @author whc 15953295779@126.com
* @since 3.0 2024-03-08
*/
@RestController
@RequestMapping("front/excludeArea")
@Api(tags="赛事报名地区控制")
public class FrontExcludeAreaController {
    @Autowired
    private SpExcludeAreaService spExcludeAreaService;


    @GetMapping("queryGroup")
    public Result<List<SpExcludeAreaDTO>> queryGroup(@RequestParam Long matchId, String city) {
        Map<String, Object> params = new HashMap<>();
        params.put("matchId", matchId);
        params.put("city", city);
        List<SpExcludeAreaDTO> list = spExcludeAreaService.list(params);
        return new Result<List<SpExcludeAreaDTO>>().ok(list);
    }


}